<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateOrderPddTrackings extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('order_pdd_trackings', function (Blueprint $table) {
            $table->id();
            $table->integer('order_id')->default(0)->comment('订单ID');
            $table->integer('supplier_staff_id')->default(0)->comment('供应商员工ID');
            $table->string('logistics_id')->default('')->comment('快递公司编号');
            $table->string('wp_code')->default('')->comment('物流公司Code');
            $table->string('tracking_number')->default('')->comment('快递运单号');
            $table->text('waybill')->nullable()->comment('面单信息');
            $table->boolean('status')->default(1)->comment('状态，1 可用，0 已用');
            $table->boolean('del_flag')->default(0)->comment('删除状态，1 删除，0 未删除');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('order_pdd_trackings');
    }
}
